﻿#include "CNormalNode.h"

CNormalNode::CNormalNode(const QString & name, const QString & sId, const QString & sConfig , CBaseNode * parent)
	: CBaseNode(sId, name, sConfig, parent)
{
	m_eNodeType = enNode;
	((CBaseNode *)parent)->addChild(this);
	m_pItem->setIcon(QIcon(":/SmartControl/Resource/files.png"));
}

CNormalNode::CNormalNode(const QString & name, const QString & sId, const QString & sConfig)
	: CBaseNode(sId, name, sConfig, nullptr)
{
	m_eNodeType = enRoot;
}

CNormalNode::~CNormalNode()
{
}

void CNormalNode::start()
{
	for (int i = 0; i < m_pVecChildren.size(); i++)
	{
		m_pVecChildren[i]->start();
	}
}

void CNormalNode::stop()
{
	for (int i = 0; i < m_pVecChildren.size(); i++)
	{
		m_pVecChildren[i]->stop();
	}
}

void CNormalNode::updateData()
{
}

bool CNormalNode::control(const QString & command, const QVariant & param)
{
	return false;
}
